Script: if objValue="Open" then ┬ wsSet wdID,"typePop","SelectionText", "Import balances"┬ wsSet wdID,"path","Text",cd fld pathField("Import balances")┬ get wsGet(wdID,"path","Text")┬ if it¡empty then┬ wsSet wdID,"View╔","Disabled", "false"┬ else┬ wsSet wdID,"View╔","Disabled", "true"┬ end if┬end if
Params: i0_TopLeft
ItemType: PUSH
Rect: 218,113,290,133
Name: Done
DefaultItem: TRUE
AutoClose: TRUE
ItemType: TEXT
Rect: 12,147,292,211
TextFont: Geneva
TextSize: 10
AutoSize: FALSE
Name: Title
Text: Choose the type of import/export from the pop-up menu to see its stored file path, if any. Click ╥Clear╙ to erase a path (prompting an open/save dialog box the next time you perform the task) or ╥Store╔╙ to select and remember a new path for future uses.
ItemType: TEXT
Rect: 60,31,294,95
TextFont: Geneva
TextSize: 10
AutoSize: FALSE
Name: path
Scrolling: TRUE
ItemType: PUSH
Rect: 116,113,196,133
Name: Store╔
Script: --on mouseUp wdID,wdName,objNo,objName,objValue┬get wsGet(wdID,"typePop","SelectionText")┬put it into type┬if "import" is in type then┬ put "Locate the text file to import from╔" into qq┬ answer file qq of type text┬else┬ put "Save the data as╔" into qq┬ ask file qq┬end if┬put the result into resultCode┬if resultCode is empty then┬ put it into filer┬ put pathField(type) into theField┬ wsSet wdID,"path","Text",filer┬ put filer into cd fld theField┬end if┬┬get wsGet(wdID,"path","Text")┬if it¡empty then┬ wsSet wdID,"View╔","Disabled","false"┬else┬ wsSet wdID,"View╔","Disabled","true"┬end if┬--end mouseUp┬┬
ItemType: PUSH
Rect: 14,113,94,133
Name: Clear
Script: get wsGet(wdID,"typePop","SelectionText")┬put empty into cd fld pathField(it)┬wsSet wdID,"path","Text",""┬get wsGet(wdID,"path","Text")┬wsSet wdID,"View╔","Disabled","true"┬
Script: --on mouseUp wdID,wdName,objNo,objName,objValue┬get wsGet(wdID,"path","Text")┬put it into filer┬if there is a file filer then┬ set cursor to watch┬ open file filer┬ repeat┬ read from file filer for 20000┬ if it=empty then exit repeat┬ put it into theData┬ end repeat┬ close file filer┬ get WindowScript("View File",wstl(480,180),theData)┬else┬ errorAns("That text file is no longer at this location. Click ╥Store╔╙ to relocate it.")┬end if┬┬--end mouseUp